<?php

$params = call_user_func_array(['yii\helpers\ArrayHelper', 'merge'], [
    require __DIR__ . '/../../../common/config/params.php',
    require __DIR__ . '/../../../common/config/params-local.php',
    require __DIR__ . '/params.php',
    require __DIR__ . '/params-local.php',
]);
return [
    'id' => 'app-mpend',
    'name' => '一起拍',
    'basePath' => dirname(__DIR__),
    'bootstrap' => ['log'],
    'controllerNamespace' => 'mpend\controllers',
    'components' => [
        'request' => [
            'csrfParam' => '_csrf-mpend',
            'parsers' => [
                'application/json' => 'yii\web\JsonParser',
            ],
        ],
        'errorHandler' => [
            'class' => 'common\base\ErrorHandler',
            'custom' => false,
        ],
        'user' => [
            'identityClass' => 'mpend\models\User',
            'enableAutoLogin' => true,
            'enableSession' => false,
            'loginUrl' => null
        ],
        'urlManager' => [
            'enablePrettyUrl' => true,
            //'enableStrictParsing' => true,
            'showScriptName' => false,
            'rules' => require __DIR__ . '/restful.php',
        ],
    ],
    'modules' => require(__DIR__ . '/module.php'),
    'params' => $params,
];
